<?php
namespace App\Models\Trade\Search;

use App\Models\Model;

class SearchHotModel extends Model
{

    const TABLENAME = 'tw_trade_search_hot';

    /**
     * 昨天零点查询
     * 
     * @param int $timed
     * @return \Illuminate\Support\Collection
     */
    public static function selectByTimed($timed = null)
    {
        $timed = ! $timed ? strtotime('today -1 days') : $timed;
        
        return self::dbTable()
            ->select(['name', 'kind_id'])
            ->where('timed', $timed)
            ->get();
    }
}
